sgvizler.example.copyElementAsText = function(getid, setid) {
    var get = document.getElementById(getid);
    var s = "&lt;" + "div ";
    for(var i = get.attributes.length-1; i>-1; i--){
	s += get.attributes[i].nodeName + '="' + get.attributes[i].nodeValue + '"\n\t';
    }
    $('#'+setid).html(s + "&gt;&lt;/div&gt;");
};

sgvizler.example.copyQuery = function(getid, setid) {
    var get = document.getElementById(getid),
        set = document.getElementById(setid),
        attr = ["data-sgvizler-query", "data-sgvizler-endpoint"];
    for(var i = 0; i < attr.length; i++){
	set.setAttribute(attr[i], get.getAttribute(attr[i]));
    }
};